#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:taotieren


"""
    rpi.gpio 需要 root 权限，板上运行需要使用
    sudo python cpu_temp.py
"""

import os, time

while True:
    dev = os.popen('/opt/vc/bin/vcgencmd measure_temp')
    cpu_temp = dev.read()
    print(cpu_temp)
    time.sleep(1)
